
package uk.addie.mp3fixer.widget;

import java.awt.event.ActionEvent;
import java.beans.PropertyChangeListener;

import javax.swing.Action;
import javax.swing.JComponent;

public class FocusAction implements Action {
    private final JComponent mWidget;

    public FocusAction(final JComponent widget) {
        mWidget = widget;
    }

    @Override public void actionPerformed(final ActionEvent e) {
        mWidget.requestFocusInWindow();
    }

    @Override public void addPropertyChangeListener(final PropertyChangeListener listener) {
        // nothing
    }

    @Override public Object getValue(final String key) {
        return null;
    }

    @Override public boolean isEnabled() {
        return true;
    }

    @Override public void putValue(final String key, final Object value) {
        // nothing
    }

    @Override public void removePropertyChangeListener(final PropertyChangeListener listener) {
        // nothing
    }

    @Override public void setEnabled(final boolean b) {
        // nothing
    }
}
